Master Angular for production apps. Learn components, templates, reactive forms, routing, state management, HttpClient, RxJS, testing, performance, and SSR. Follow patterns for modular architecture, accessibility, internationalization, and CI/CD-ready deployments.
4,465 posts1,098 contributors
I want to make a tooltip on textbox,For this i make angularjs attribute directive but my div is not showing. HTML code:- address1<input type="text" ng-model="data2" tooltip5 style="width:50px" /> angularjs code:- app.directive('tooltip5', function ($compile) { return function (scope, elm, attrs) { elm.bind("mouseover", function () { var el = angular.element('<span/>'); el.append('<div style="display:inherit;background-color:red">hjjjjjjjjjjjjj</div>'); $compile(el)(scope); elm.append(el); }); } }); when i see Inspect div is added into TextBox but it will not display. Please some one help me
Hello Dear, I am creating a project in asp.net MVC Single Page Application and trying to implement angularjs. Here problem is which i am facing that when i want to open html template then it gives error path not found. if I open template after creating a server side controller for that then it gets open. Here I need to open html template without server side action. what should i do? Please have a look at my angular UIrouting code 'use strict'; var app=angular .module('sbAdminApp', [ 'ui.router' ]) app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function ($stateProvider, $urlRouterProvider, $locationProvider) { $urlRouterProvider.otherwise('/'); $locationProvider.html5Mode({ enabled: false, requireBase: false }); $stateProvider .state('Home', { url: '/', views: { 'user': { templateUrl: '/Views/Home/Test.html', data: { pageTitle: 'Demo Home' }, <div id="pastingspan
Hi, I have a form that contains many fields exp : <input "ng-model = from.username" > exp : <select "ng-model = from.Products"> Products is an Object $scope.master={}; $scope.master = angular.copy(form); I want to get Products.Id and put it to $scope.master and NOT get the Object Product. Thanks
In this AngularJS example you will learn how to display data in table format using ng-repeat in HTML Table. Here you can view the output of the example and you can also "try it yourself" by clicking on "Try Now" button given at the bottom. Example <table> <th>Name</th><th>Last Name</th><th>Designation</th> <th>Salary</th><th>Phone</th> <tr ng-repeat="emp in employees"> <td>{{ emp.firstName }}</td> <td>{{ emp.lastName }}</td> <td>{{ emp.jobTitle }}</td> <td>{{ emp.salary }}</td> <td>{{ emp.phone }}</td> </tr> </table> Example Display Data in HTML Table <!DOCTYPE html> <html> <head> <!-- www.techstrikers.com --> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.1/angular.min.js"></script> <div id="p
Hi, I have one search page when search some employee and click on search button the details should be diaplayed below without refreshing the page .the details page is in another partial page so how to render this partial page inside the div Please help me Thanks
how to allow only alphabets and space in textbox using AngularJS
Hi, I have a table in SQL Server 2008 as Employee table. I got data using ADO.Net from database using ASP.Net. How to get Employee data in AngularJS framework ?
Hi, I am new to angular js..I need help on autocomplete text box. when i type the name it should suggest the name what i type please help me Thank You
While posting a form angular.identity is used.What is the purpose of this and withCredential is also used. Please explain??
Hello, I want to click a button from controller. e.g my html has a button:- <button class="item" ng-click="selectTabWithIndex(1)">Select tab 2!</button> like this. I want to hit button from controller. in Jquery we can do this. $( "#target" ).click(); but how would be done by AngularJs ?.
hello friends any of u give me links how to handle multiple buttons in angular using mvc suppose i have 2 btns save,Edit when i click on save fire on save ctrl, when i click on Editfire on save ctrl
<div ng-controller="pucdes"> <form name="f1" ng-submit="Savedata(apis)"> <div> {{mess}} </div> <input type="text" name="jjj" ng-class="Submitted?'ng-girty':''" required autofocus /> <span class="Error" ng-show="(f1.jjj.$dirty ||Submitted) && f1.jjj.$error.required">kkkkkkk</span> {{mess}} <input type="submit" ng-click="myFunction()" value="Savedata"> <input type="submit" ng-click="myFunction2()" value="Editdata"> </form> </div> angular.module("MyApp") .controller("pucdes", function ($scope, locationder) { $scope.Savedata = function () { $scope.Submitted = true; alert("ppp"); locationder.Sessiondata2($scope.myFunction) .then(function (d) { alert('fjfbffbjbf') $scope.mess = "jjjjjjj.......sucess......."; })
<div ng-controller="Part1Controller"> <form name="f1" novalidate ng-submit="SaveData(tab1)"> <div style="color:red"> {{meassage}} </div> <table> <tr> <td class="headder">Enter Employee Name</td> <td> <input type="text" name="tName" ng-model="tab1.Name" ng-class="Submitted? 'ng-dirty':''" required autofocus> <span class="Error" ng-show="(f1.tName.$dirty ||Submitted ) && f1.tName.$error.required">Please Enter Employee Name</span> </td> </tr> <tr> <td class="headder">Enter Employee EmailId</td> <td> <input type="email" name="tEmail" ng-model="tab1.Email" ng-class="Submitted? 'ng-dirty':''" required /> <span class="Error" ng-show="(f1.tEmail.$dirty ||Submitted ) && f1.tEmail.$error.required">Please Enter Your EmailId</span> </td> </tr> <tr> <td class="headder">Select Your Gender<
i have a html table which is binding using angularjs using ng-repeat.
Hello friends please help me how to bind the values into dropdown list using mvc angularjs & also when value change in drplist the according to that table data also change mean if i select id 2 immediatly 2 record come sooo Thank u
can any body tell me how to inser the data in two related tables by using angular js using ng-model
hi i am starter in angularjs. I want to inject controller in app.js using $stateProvider. This is my code $state('/home',{ url:'home', templateurl :'home.html', controller : ' homecontroller' }) but controller does not load when we run tha application
How can i use routing in AngularJs Usiing $stateProvider. $steteProvider('/home',{ url:'/homepage', templateUrl:'home.html', controller:'homecontroller' }) i am not able to load controller on runtime.Error comes out controller not found.I searched more times on internet but i did not get right answer.If every one know this type routing. Please give me suitable example
Hi All, I am working on angular application, i am using asp.net mvc(not .html page). in which i need dynamic menu + routing + i want to remove # from url. how to use .cshtml page as templates?is it possible? i am using angular 1.5.0 i already tried below mentioned solutions but its not working for me. http://csharp-video-tutorials.blogspot.in/2016/02/remove-from-url-angularjs.html (this solution working fine for html templates but not for cshtml) http://stackoverflow.com/questions/25785579/is-angular-routing-template-url-support-for-cshtml-file-in-asp-net-mvc-5-projec please let me know if any one has solution for this problem. Many Thanks.
What is templateurl in angular js ? When can we go across it ?
I have two textboxes the second textbox value should be allow only greater than first textbox value , how can i make the validation or if the second textbox value is less than first textbox value , it should show the alert and the focus should be in the second textbox
I am using np table in angular for data binding. ng table show paging and total number of record but when I add new row or remove one row from data model in ng table. Total row is reflected but total number of record and paging not reflected. I have used bleow code Any one can help me.. $scope.viewDeleteTemplateModel = function (templateId, name) { if (parseInt(templateId, 10) <= 0) { $scope.bindPopUpMessages(Enum.AlertType.Error, "TemplateId must be greater than zero." ); //showing smart popup alert } else { $scope.bindSmartAlert( "<i class='fa fa-fw fa-reorder'></i> Template" , "Do you really want to delete the <strong>" + name + "</strong> template?" , function () { if ($scope.Prop
I have Two Projects and i want to merge them ine one File JavaScript Project : 1 File : App.Js var app = angular.module('PegaseApp', ['ngTouch', 'SignalR', 'ui.grid', 'ui.grid.selection', 'ui.grid.resizeColumns', 'ui.bootstrap', 'ui.bootstrap.datetimepicker', 'AxelSoft']); File : Intervention.Js angular.module('PegaseApp') .controller('MainCtrl', ['$rootScope', '$scope', 'HubManager', function ($rootScope, $scope, HubManager) { ........ } ); Project : 2 File : spl.Js angular.module('myApp', ['bgDirectives']); angular.module('bgDirectives', []) .directive('bgSplitter', function () { .......... }); The expected result is to combine this two projects in one File Javascript and one File Html
0 error but still code not works. _____________________HTMLfile___________________________________ <!DOCTYPE html> <html ng-app="myModule"> <head> <script src="angular.js"></script> <script src="main.js"></script> <title>AngularJS</title> <meta charset="utf-8" /> </head> <body style="font-family:'Cambria Math';"> <div ng-controller="myController"> <table> <thead> <tr> <th>Language</th> <th>Likes</th> <th>Dislikes</th> <th>Like/Dislike</th> </tr> <tr ng-repeat="myindex in technologies"> <td>{{ myindex.name }}</td> <td>{{ myindex.likes }}</td> <td>{{ myindex.dislikes }}</td> <td> <input type="button" value="Like" ng-click=" incrementlikes(myindex) "/> <input type="button" value="Dislike" ng-click=" incrementdislikes(myindex) " /> </td> </tr> </thead> </table> </div> </body> </html> ------------------------main.js---------------------------