javascript - Custom directive in angular js -


Why this custom instruction in angular JS is not working for me. I am only receiving users: Users passed in the UserInfo Custom Directory Tags

user_directive_index.html file:

  & lt; Html ng-app = 'app' & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Title & gt; User Directive & lt; / Title & gt; & Lt; Body & gt; & Lt; Div & gt; & Lt; Div ng-model = 'first controller' & gt; & Lt; Userinfo user = "royalties" & gt; & Lt; / Userinfo & gt; & Lt; / Br & gt; & Lt; Userinfo user = "suede" & gt; & Lt; / Userinfo & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" src = "../ js / angular.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = 'app.js' & gt; & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

App.js file :

  var app 1 = angular Module ('app', []); App1.controller ('first controller', function ($ scope) {$ scope.raj = {}; $ scope.raj.firstname = 'Rajeshwar'; $ scope.raj.lastname = 'boss'; $ scope.Sudhir = {}; $ Scope Sudhir, first name = 'Sudhir'; $ diamond. Sudhir .lastname = 'Ranjan';}); App1 directive ('userinfo', function () {var directive = {}; directive.rtec = 'e'; directive tremlet = 'user: {{user.fstname}} {{user.lastname}}' directive .scope = {User: "user =}"; return instructions;});  

I found this code:

You must change the instructions here

  & lt; Div ng-model = 'firstcontroller' & gt; ^^^^^  

& lt; Div ng-controller = 'firstcontroller' & gt;

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -